{include file="header_with_login.tpl"}
{include file="tabs.tpl"}

<div id="main" class="main">
	<div id="centertablewrapper" class="centertablewrapper">
		<table class="centeredtable"> 

<tr>
	<td>
	<div class="mediatitle">{$media.title}</div>
	<a href="http://s3.amazonaws.com/{$media.bucket}/{$media.filename}" rel="lightbox" title="{$media.title}"><img src="{$media.thumb_url}" border="0"></a>
	<br /><span>Taken by <a href="/user/info/username/{$media.username}">{$media.username}</a>
	on {$media.date|date_format:"%B %d, %Y"} at {$media.date|date_format:"%I:%M%p"|lower}
	</td>
	<td>
	
	{if $authenticated}
	<div style="font-size: 14px; color: #333333;">Leave a comment</div>
	<form method="post" action="">
	<textarea name="comment" style="width: 400px; height: 200px;"></textarea><br />
	<input type="submit" name="submit" value="Leave comment">
	</form>
	{else}
	Please log in.
	{/if}
	</td>
</tr>
<tr>
	<td colspan="2">
	{foreach from=$comments item=comment}
		<div style="margin-bottom: 10px;">
			{$comment.username}: {$comment.comment}<br />
			<span style="font-size: 10px;">{$comment.date|date_format:"%A, %B %e, %Y"} at {$comment.date|date_format:"%I:%M%p"|lower}</span>
		</div>
	{/foreach}
	</td>
</tr>
</table>

	</div>
</div>

{include file="footer.tpl"}
